﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="AddDepartment.ascx.cs"
    Inherits="ServicesDirectory.UserControl.AddDepartment" %>
<%@ Register Src="LookupBusinessType.ascx" TagName="LookupBusinessType" TagPrefix="uc1" %>
<%@ Register Src="ListContact.ascx" TagName="ListContact" TagPrefix="uc2" %>
<%@ Register Src="LookupAddress.ascx" TagName="LookupAddress" TagPrefix="uc3" %>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
        <div class="bgManager">
            <div class="TitleManarer">
                Add Department
            </div>
            <div id="tabs_container">
                <ul id="tabs">
                    <li class="active"><a href="#tab1">Details</a></li>
                </ul>
                <div class="topbutton">
                    <asp:Button runat="server" Text="Save" ID="cmdSave" OnClick="Save_Click" />&nbsp;
                    <asp:Button runat="server" Text="Back" ID="cmdBack" />
                </div>
            </div>
            <div id="tabs_content_container">
                <div id="tab1" class="tab_content" style="display: block;">
                    <div class="ManagerContentBorder">
                        <div class="spaceManager">
                        </div>
                        <div class="titleCol1">
                            Department Name <span class="mandatoryFields">*</span>
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox runat="server" ID="TxtName" Width="100%" AutoPostBack="True" OnTextChanged="TxtName_TextChanged"></asp:TextBox>
                            <asp:RequiredFieldValidator ID="RfvTxtName" ControlToValidate="TxtName" runat="server"
                                Display="None" ErrorMessage="Name can't left blank" SetFocusOnError="True"></asp:RequiredFieldValidator>
                        </div>
                        <div class="titleCol1">
                            Type of Business
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox runat="server" ID="TxtTypeBusiness" Enabled="false" Width="65%"></asp:TextBox>
                            &nbsp;
                            <asp:LinkButton runat="server" ID="LbtLookupBusiness" Text="Lookup" OnClick="LbtLookupBusiness_Click"></asp:LinkButton>
                        </div>
                        <div class="spaceManager">
                        </div>
                        <div class="titleCol1">
                            Department Short Description <span class="mandatoryFields">*</span>
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox runat="server" TextMode="MultiLine" Rows="3" ID="TxtShortDescription"
                                Width="100%" MaxLength="50"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="RfvTxtShortDesc" ControlToValidate="TxtShortDescription"
                                Display="None" runat="server" ErrorMessage="Short description can't left blank"
                                SetFocusOnError="True"></asp:RequiredFieldValidator>
                        </div>
                        <div class="titleCol1">
                            SIC Code
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox runat="server" ID="TxtSicCode" Width="30%" Enabled="False"></asp:TextBox>
                        </div>
                        <div class="spaceManager">
                        </div>
                        <div class="titleCol1">
                            Lead Contact
                            <br />
                            <br />
                            Copy Address from
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox ID="TxtLeadContact" Enabled="False" runat="server" Width="65%"></asp:TextBox>
                            &nbsp;
                            <asp:LinkButton runat="server" ID="LbtLookupContact" Text="Lookup" OnClick="LbtLookupContact_Click"></asp:LinkButton>
                            <br />
                            <br />
                            <asp:RadioButtonList ID="RblCopy" runat="server" RepeatDirection="Horizontal" AutoPostBack="True"
                                OnSelectedIndexChanged="RblCopy_SelectedIndexChanged">
                                <asp:ListItem> Organisation</asp:ListItem>
                                <asp:ListItem> Parent</asp:ListItem>
                            </asp:RadioButtonList>
                        </div>
                        <div class="titleCol1">
                            Department Full Description
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox ID="TxtFullDescription" TextMode="MultiLine" Rows="3" Width="100%" runat="server"></asp:TextBox>
                        </div>
                        <div class="spaceManager">
                        </div>
                        <div class="titleCol1">
                            Address Line 1
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox ID="TxtAddress1" runat="server" Width="100%"></asp:TextBox>
                        </div>
                        <div class="titleCol1">
                            Phone Number
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox ID="TxtPhone" runat="server" Width="100%"></asp:TextBox>
                        </div>
                        <div class="spaceManager">
                        </div>
                        <div class="titleCol1">
                            Address Line 2
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox ID="TxtAddress2" runat="server" Width="100%"></asp:TextBox>
                        </div>
                        <div class="titleCol1">
                            Fax
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox ID="TxtFax" runat="server" Width="100%"></asp:TextBox>
                        </div>
                        <div class="spaceManager">
                        </div>
                        <div class="titleCol1">
                            Address Line 3
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox ID="TxtAddress3" runat="server" Width="100%"></asp:TextBox>
                        </div>
                        <div class="titleCol1">
                            Email
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox ID="TxtEmail" runat="server" Width="100%"></asp:TextBox>
                        </div>
                        <div class="spaceManager">
                        </div>
                        <div class="titleCol1">
                            Postcode
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox ID="TxtPostcode" runat="server" Width="65%" Enabled="False"></asp:TextBox>
                            &nbsp;
                            <asp:LinkButton ID="LbtLookupPostcode" runat="server" OnClick="LbtLookupPostcode_Click">Lookup</asp:LinkButton>
                        </div>
                        <div class="titleCol1">
                            Web Address
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox ID="TxtWebAddress" runat="server" Width="100%"></asp:TextBox>
                        </div>
                        <div class="spaceManager">
                        </div>
                        <div class="titleCol1">
                            Town/Village/City
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox ID="TxtTown" runat="server" Width="100%" Enabled="False"></asp:TextBox>
                        </div>
                        <div class="spaceManager">
                        </div>
                        <div class="titleCol1">
                            County
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox ID="TxtCounty" runat="server" Width="100%" Enabled="False"></asp:TextBox>
                        </div>
                        <div class="spaceManager">
                        </div>
                        <div class="titleCol1">
                            Nation/Country
                        </div>
                        <div class="titleCol2">
                            <asp:TextBox ID="TxtCountry" runat="server" Width="100%" Enabled="False"></asp:TextBox>
                        </div>
                        <div class="spaceManager">
                        </div>
                        <asp:Label ID="LblStatus" runat="server" Text=""></asp:Label>
                        <asp:ValidationSummary ID="ValidationSummary1" runat="server" DisplayMode="List"
                            EnableClientScript="True" />
                    </div>
                    <asp:HiddenField ID="hdfBusinessId" runat="server" />
                    <asp:HiddenField ID="hdfContactId" runat="server" />
                    <asp:HiddenField ID="hdfAddressId" runat="server" />
                </div>
            </div>
        </div>
        <asp:Panel ID="plLookupBusiness" runat="server" Visible="false" CssClass="web_dialog">
            <uc1:LookupBusinessType ID="LookupBusinessType1" runat="server" />
        </asp:Panel>
        <asp:Panel ID="plLookupContact" runat="server" Visible="false" CssClass="web_dialog">
            <uc2:ListContact ID="ListContact1" runat="server" />
        </asp:Panel>
        <asp:Panel ID="plLookupAddress" runat="server" Visible="false" CssClass="web_dialog">
            <uc3:LookupAddress ID="LookupAddress1" runat="server" />
        </asp:Panel>
    </ContentTemplate>
</asp:UpdatePanel>
